import instance from "./request";

// 查询订单
export const selectOrderItem = (params: IOrderFormParamsModel): RES<IOrderSelectRusultModel> => {
  return instance({
    url: "/order/list",
    params
  })
}


// 批量关闭订单
// { ids: number, note: string }
export const closeOrder = (params: any) => {
  return instance({
    url: "/order/update/close",
    method: "post",
    params
  })
}

// 批量删除订单
export const deleteOrder = (params: { ids: number[] | number | string }): RES<number> => {
  return instance({
    url: "/order/delete",
    method: "post",
    params
  })
}

// 订单批量发货
export const sendOrder = (data: IOrderDeliveryParamsModel): RES<number> => {
  return instance({
    url: "order/update/delivery",
    method: "post",
    data
  })
}